package com.example.demo_test.Dao;

import com.example.demo_test.DTO.CreateGroupDto;
import com.example.demo_test.Entity.Group;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface GroupDao {
    List<Group> getGroup(@Param( "userId" ) String userId);
    int createGroup(@Param( "createGroupDto" ) CreateGroupDto createGroupDto);
    void joinGroup(@Param( "userId" ) String userId,@Param( "groupId" ) int groupId,@Param( "isLord" )String isLord);

    String isInGroup(@Param( "userId" )String userId,@Param( "groupId" )int groupId);

    void exitGroupChat(@Param( "userId" ) String userId,@Param( "groupId" ) String groupId);

    void updateAvatar(@Param( "groupId" )int groupId,@Param( "avatarPath" )String avatarPath);

    void deleteGroupChat(@Param( "groupId" ) String groupId);

    List<String> getGroupAvatarPath();
}
